#ifndef MODULE_IO_PORT_MANAGER_H
#define MODULE_IO_PORT_MANAGER_H

#include "BlockingQueue.h"
#include <map>

using ModuleQueue = std::shared_ptr<BlockingQueue<std::shared_ptr<void>>>;

class ModuleIOPortManager {
public:
    static ModuleIOPortManager &GetInstance();
    APP_ERROR SendData(const std::string &port, const std::shared_ptr<void> &data);
    APP_ERROR GetData(const std::string &port, std::shared_ptr<void> &data);
    uint32_t GetSize(const std::string &port);
    void Clear();
private:
    ModuleIOPortManager() = default;
    ~ModuleIOPortManager() = default;
    std::map<std::string, ModuleQueue> queues_ = {};
    
};


#endif